<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>资源管理</title>
		<!-- 项目基准路径 -->
		<base href="/bestinc/" />
		
		<!-- 引入layui的css -->
		<link rel="stylesheet" href="static/layui/css/layui.css"  media="all">
		
		<!-- 引入资源css -->
		<link rel="stylesheet" href="static/css/system/resource/resource.css"  media="all">
		
		<!-- 引入美化css -->
		<link rel="stylesheet" href="static/css/util.css" media="all">
		
		<!-- 引入jqeury -->
		<script src="static/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 引入layui的js -->
		<script src="static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 引入拼音工具js -->
		<script src="static/js/ChinesePY.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 引入资源js -->
		<script src="static/js/system/resource/resource.js" type="text/javascript" charset="utf-8"></script>
		
		<!-- 引入按钮权限控制js -->
		<script src="static/js/system/power/authorityControl.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
	<!--  -->
	<div id="content">
		<!-- 头部搜索框 -->
		<div id="search-header">
		  <form class="layui-form">
		      <div class="layui-form-item">
		        <div class="layui-inline">
		          <label class="layui-form-label" style="width: 70px">搜索资源：</label>
		          <div class="layui-input-inline">
		            <input type="text" name="keyword" placeholder="请输入关键字" autocomplete="off" class="layui-input">
		          </div>
		        </div>
		        <div class="layui-inline" style="padding-left: 50px;">
		          <button class="layui-btn" lay-submit="" lay-filter="resourceSearchBtn">
		            	<i class="layui-icon layui-icon-search"></i>
		            	查询
		            </button>
		            <button id="searchReset" class="layui-btn" type="reset">
		            	<i class="layui-icon layui-icon-refresh"></i>
		            	重置
		            </button>
		            <button id="unfoldAll" class="layui-btn" type="button">
		            	展开
		            </button>
		            <button id="foldAll" class="layui-btn" type="button">
		            	折叠
		            </button>
		        </div>
		      </div>
	      </form>
	    </div>
	    
	    <!-- 美化样式 -->
	    <div id="dataDiv">
		    <!-- 数据表格头部工具栏 -->
		    <div class="layui-table-tool resource-layui-table-tool">
		    	<div class="layui-table-tool-temp">
		    		<div class="layui-btn-group">
		    			<span class="btnCont" style="display: none;">
		    				<button title="添加" class="resource-toolbar layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe654;</i>添加</button>
		    				<button title="删除" class="resource-toolbar layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe640;</i>删除</button>
		    			</span>
		    		</div>
		    	</div>
		    </div>
		    <!-- 数据表格 -->
			<table class="layui-hide" id="resourceTable" lay-filter="resourceTableEvent">
			</table>
		</div>
		
		<!-- 添加模态框 -->
		<div id="addResourceModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="addResourceForm" lay-filter="addResourceForm" class="layui-form">
			  <!-- 隐藏域 -->
			  <input type="hidden" name="parentId" value="" />
			  <input type="hidden" id="resourceUrlBackup" value="" />
			  
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源名</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceName" lay-verify="required" placeholder="请输入资源名" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源简称</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceAbbr" lay-verify="required"  placeholder="" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">父资源</label>
			    <div class="layui-input-block">
			      <input type="text" name="parentName" disabled="disabled" lay-verify="required"  placeholder="请选择父资源" autocomplete="off" class="layui-input ban">
			      <i title="点我" id="searchParentResource" class="layui-icon">&#xe615;</i>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源路径</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceUrl" lay-verify="required"  placeholder="" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源类型</label>
			    <div class="layui-input-block">
			      <input type="radio" name="subsetName" value="menu" title="菜单" checked="">
			      <input type="radio" name="subsetName" value="btn" title="按钮">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源等级</label>
			    <div class="layui-input-block">
			   	 <input type="text" name="resourceRank" disabled="disabled" lay-verify="required"  placeholder="" autocomplete="off" class="layui-input ban">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源序号</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceNumber" disabled="disabled" lay-verify="required"  placeholder="" autocomplete="off" class="layui-input ban">
			    </div>
			  </div>
			  <div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">描述</label>
			    <div class="layui-input-block">
			      <textarea name="description" placeholder="请输入内容" class="layui-textarea"></textarea>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block" style="text-align: right;">
			      <button class="layui-btn layui-btn-primary modalClose" type="button">关闭</button>
            	  <button class="layui-btn" type="submit" lay-filter="addResourceBtn" lay-submit="">立即提交</button>
			    </div>
			  </div>
			</form>
		</div>
		
		<!-- 修改模态框 -->
		<div id="updateResourceModal" class="definedModal">
			<!-- 这里手动加表单样式 -->
			<form id="updateResourceForm" lay-filter="updateResourceForm" class="layui-form" action="">
			  <!-- 隐藏域 -->
			  <input type="hidden" name="resourceId" value="" />
			  <input type="hidden" name="_method" value="PUT" />
			  
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源名</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceName" lay-verify="required" placeholder="请输入资源名" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源简称</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceAbbr" lay-verify="required" placeholder="请输入资源简称" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源类型</label>
			    <div class="layui-input-block">
			      <input type="radio" name="subsetName" value="menu" title="菜单" checked="">
			      <input type="radio" name="subsetName" value="btn" title="按钮">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源路径</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceUrl" placeholder="请输入资源路径" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <label class="layui-form-label">资源序号</label>
			    <div class="layui-input-block">
			      <input type="text" name="resourceNumber" lay-verify="required" placeholder="请输入资源序号" autocomplete="off" class="layui-input">
			    </div>
			  </div>
			  <div class="layui-form-item layui-form-text">
			    <label class="layui-form-label">描述</label>
			    <div class="layui-input-block">
			      <textarea name="description" placeholder="请输入内容" class="layui-textarea"></textarea>
			    </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block" style="text-align: right;">
			      <button class="layui-btn layui-btn-primary modalClose" type="button">关闭</button>
            	  <button class="layui-btn" type="submit" lay-filter="updateResourceBtn" lay-submit="">立即提交</button>
			    </div>
			  </div>
			</form>
		</div>
		
		<!-- 资源树模态框 -->
		<div id="resourceTreeModeal" style="display:none">
			<!-- 树形资源组件 -->
			<div id="resourceTree"></div>
		</div>
		
		<!-- 工具栏列 -->
		<script type="text/html" id="resourceBar">
			<span class="btnCont" style="display: none;">
  				<a title="修改" class="layui-btn layui-btn-xs" lay-event="update">修改</a>
			</span>
		</script>
	</div>
	</body>
</html>
